package com.education.welco.service.impl;


import com.education.common.utils.Convert;
import com.education.welco.mapper.SAnswerUserMapper;
import com.education.welco.pojo.SAnswerUser;
import com.education.welco.service.ISAnswerUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 点赞用户中间表 服务层实现
 *
 * @author d
 * @date 2020-05-21 10:50:11
 */
@Service
public class SAnswerUserServiceImpl implements ISAnswerUserService {

    @Autowired
    private SAnswerUserMapper sAnswerUserMapper;

    //查询点赞用户中间表信息
    @Override
    public SAnswerUser selectSAnswerUserById(Integer id) {
        return sAnswerUserMapper.selectSAnswerUserById(id);
    }

    // 查询点赞用户中间表列表
    @Override
    public List<SAnswerUser> selectSAnswerUserList(SAnswerUser sAnswerUser) {
        return sAnswerUserMapper.selectSAnswerUserList(sAnswerUser);
    }

    // 新增点赞用户中间表
    @Override
    public int insertSAnswerUser(SAnswerUser sAnswerUser) {
        return sAnswerUserMapper.insertSAnswerUser(sAnswerUser);
    }

    //修改点赞用户中间表
    @Override
    public int updateSAnswerUser(SAnswerUser sAnswerUser) {
        return sAnswerUserMapper.updateSAnswerUser(sAnswerUser);
    }

    //删除${tableComment}对象
    @Override
    public int deleteSAnswerUserByIds(String ids) {
        return sAnswerUserMapper.deleteSAnswerUserByIds(Convert.toStrArray(ids));
    }

    @Override
    public int deleteSAnswerUserByUserIdAndAnswerId(SAnswerUser sAnswerUser) {
        return sAnswerUserMapper.deleteSAnswerUserByUserIdAndAnswerId(sAnswerUser);
    }
}